﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

/// <summary>
/// 工艺管理:工序设置表基础输入参数
/// </summary>
public class ProcesssetBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 工序编码
    /// </summary>
    public virtual string? ProcessSetId { get; set; }
    
    /// <summary>
    /// 工序名称
    /// </summary>
    public virtual string? ProcessSetName { get; set; }
    
    /// <summary>
    /// 工序说明
    /// </summary>
    public virtual string? ProcessSetExplain { get; set; }
    
    /// <summary>
    /// 准备时间
    /// </summary>
    public virtual DateTime? ProcessSetUpTime { get; set; }
    
    /// <summary>
    /// 生产时间
    /// </summary>
    public virtual DateTime? ProcessSetTime { get; set; }
    
    /// <summary>
    /// 是否启用
    /// </summary>
    public virtual bool? IsEnable { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    public virtual string? Desc { get; set; }
    
    /// <summary>
    /// 是否质检
    /// </summary>
    public virtual bool? IsExamine { get; set; }
    
}

/// <summary>
/// 工艺管理:工序设置表分页查询输入参数
/// </summary>
public class PageProcesssetInput : BasePageInput
{
    /// <summary>
    /// 工序编码
    /// </summary>
    public string? ProcessSetId { get; set; }
    
    /// <summary>
    /// 工序名称
    /// </summary>
    public string? ProcessSetName { get; set; }
    
    /// <summary>
    /// 是否启用
    /// </summary>
    public bool? IsEnable { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 工艺管理:工序设置表增加输入参数
/// </summary>
public class AddProcesssetInput
{
    /// <summary>
    /// 工序编码
    /// </summary>
    [MaxLength(32, ErrorMessage = "工序编码字符长度不能超过32")]
    public string? ProcessSetId { get; set; }
    
    /// <summary>
    /// 工序名称
    /// </summary>
    [MaxLength(32, ErrorMessage = "工序名称字符长度不能超过32")]
    public string? ProcessSetName { get; set; }
    
    /// <summary>
    /// 工序说明
    /// </summary>
    [MaxLength(32, ErrorMessage = "工序说明字符长度不能超过32")]
    public string? ProcessSetExplain { get; set; }
    
    /// <summary>
    /// 准备时间
    /// </summary>
    public DateTime? ProcessSetUpTime { get; set; }
    
    /// <summary>
    /// 生产时间
    /// </summary>
    public DateTime? ProcessSetTime { get; set; }
    
    /// <summary>
    /// 是否启用
    /// </summary>
    public bool? IsEnable { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [MaxLength(32, ErrorMessage = "备注字符长度不能超过32")]
    public string? Desc { get; set; }
    
    /// <summary>
    /// 是否质检
    /// </summary>
    public bool? IsExamine { get; set; }
    
}

/// <summary>
/// 工艺管理:工序设置表删除输入参数
/// </summary>
public class DeleteProcesssetInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 工艺管理:工序设置表更新输入参数
/// </summary>
public class UpdateProcesssetInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 工序编码
    /// </summary>    
    [MaxLength(32, ErrorMessage = "工序编码字符长度不能超过32")]
    public string? ProcessSetId { get; set; }
    
    /// <summary>
    /// 工序名称
    /// </summary>    
    [MaxLength(32, ErrorMessage = "工序名称字符长度不能超过32")]
    public string? ProcessSetName { get; set; }
    
    /// <summary>
    /// 工序说明
    /// </summary>    
    [MaxLength(32, ErrorMessage = "工序说明字符长度不能超过32")]
    public string? ProcessSetExplain { get; set; }
    
    /// <summary>
    /// 准备时间
    /// </summary>    
    public DateTime? ProcessSetUpTime { get; set; }
    
    /// <summary>
    /// 生产时间
    /// </summary>    
    public DateTime? ProcessSetTime { get; set; }
    
    /// <summary>
    /// 是否启用
    /// </summary>    
    public bool? IsEnable { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>    
    [MaxLength(32, ErrorMessage = "备注字符长度不能超过32")]
    public string? Desc { get; set; }
    
    /// <summary>
    /// 是否质检
    /// </summary>    
    public bool? IsExamine { get; set; }
    
}

/// <summary>
/// 工艺管理:工序设置表主键查询输入参数
/// </summary>
public class QueryByIdProcesssetInput : DeleteProcesssetInput
{
}

/// <summary>
/// 工艺管理:工序设置表数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportProcesssetInput : BaseImportInput
{
    /// <summary>
    /// 工序编码
    /// </summary>
    [ImporterHeader(Name = "工序编码")]
    [ExporterHeader("工序编码", Format = "", Width = 25, IsBold = true)]
    public string? ProcessSetId { get; set; }
    
    /// <summary>
    /// 工序名称
    /// </summary>
    [ImporterHeader(Name = "工序名称")]
    [ExporterHeader("工序名称", Format = "", Width = 25, IsBold = true)]
    public string? ProcessSetName { get; set; }
    
    /// <summary>
    /// 工序说明
    /// </summary>
    [ImporterHeader(Name = "工序说明")]
    [ExporterHeader("工序说明", Format = "", Width = 25, IsBold = true)]
    public string? ProcessSetExplain { get; set; }
    
    /// <summary>
    /// 准备时间
    /// </summary>
    [ImporterHeader(Name = "准备时间")]
    [ExporterHeader("准备时间", Format = "", Width = 25, IsBold = true)]
    public DateTime? ProcessSetUpTime { get; set; }
    
    /// <summary>
    /// 生产时间
    /// </summary>
    [ImporterHeader(Name = "生产时间")]
    [ExporterHeader("生产时间", Format = "", Width = 25, IsBold = true)]
    public DateTime? ProcessSetTime { get; set; }
    
    /// <summary>
    /// 是否启用
    /// </summary>
    [ImporterHeader(Name = "是否启用")]
    [ExporterHeader("是否启用", Format = "", Width = 25, IsBold = true)]
    public bool? IsEnable { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [ImporterHeader(Name = "备注")]
    [ExporterHeader("备注", Format = "", Width = 25, IsBold = true)]
    public string? Desc { get; set; }
    
    /// <summary>
    /// 是否质检
    /// </summary>
    [ImporterHeader(Name = "是否质检")]
    [ExporterHeader("是否质检", Format = "", Width = 25, IsBold = true)]
    public bool? IsExamine { get; set; }
    
}
